# coding=utf-8

from urllib.parse import unquote_plus as urlquote

#本地环境配置
DEBUG = True
#mysql
#打印SQL语句
SQLALCHEMY_ECHO = True
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:root@127.0.0.1/pokergame?charset=utf8mb4"
#SQLALCHEMY_DATABASE_URI = "mysql+pymysql://root:%s@39.104.130.95/community_ec?charset=utf8mb4" % urlquote('Nianjia2018614@TwentiesPlus.com')
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_ENCODING = "utf8mb4"

STATIC_PREFIX = "D:\\WorkSpaces\\PythonWorkspace\\PokerGameWebServer\\static\\"
UPLOAD_PREFIX = "D:\\WorkSpaces\\PythonWorkspace\\PokerGameWebServer\\static\\upload\\"

APP = {
    'domain':'http://127.0.0.1:8986'
}

REDIS_URL = "redis://localhost:6379/2"

CACHE = {
    "CACHE_TYPE": "redis",
    "CACHE_REDIS_HOST": "127.0.0.1",
    "CACHE_REDIS_PORT": 6379,
    "CACHE_REDIS_DB": 2,
    "CACHE_REDIS_PASSWORD": "",
}


MONGODB_SETTINGS = {
    "host":'127.0.0.1',
    "port":27017,
    "username":'',
    "password":'',
    "db":"community_ec"
}

PYMONGO = {
    "URI":"mongodb://%s:%s/%s" % (MONGODB_SETTINGS["host"], MONGODB_SETTINGS["port"], MONGODB_SETTINGS["db"]),
    "MONGO_USERNAME": MONGODB_SETTINGS["username"],
    "MONGO_PASSWORD": MONGODB_SETTINGS["password"],
}

